package com.project.feign.client;

import com.project.common.core.utils.exception.Result;
import com.project.feign.client.impl.WeChatMiniClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 小程序服务调用客户端
 *
 * @Author: wyy
 * @Date: 2020-04-24 15:06
 */
@FeignClient(name = "xywechat-service", fallback = WeChatMiniClientImpl.class)
public interface WeChatMiniClient {

    /**
     * 生成无限制小程序码
     *
     * @param scene   场景值
     * @param pageUri 小程序页面路由地址
     * @param width   小程序码大小
     * @return
     */
    @PostMapping(value = "/xyWeChat/mini/getMiniQrCodeImg")
    Result<String> getMiniQrCodeImg(@RequestParam("scene") String scene, @RequestParam("pageUri") String pageUri, @RequestParam("width") int width);
}
